﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace T.FAS.Runtime.Metadata.Entity.DataModel
{
    //[DataContract]
    [Serializable]
    public class DataObjectIndexColumn : System.ICloneable
    {
        /// <summary>
        /// 标识
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 索引ID
        /// </summary>
        [JsonIgnore]
        public string IndexID { get; set; }

        /// <summary>
        /// DO.ID
        /// </summary>
        [JsonIgnore]
        public string DataObjectID { get; set; }

        /// <summary>
        /// 列ID
        /// </summary>
        public string ColumnID { get; set; }

        /// <summary>
        /// 列顺序
        /// </summary>
        public int ColumnOrder { get; set; }

        /// <summary>
        /// 是否升序
        /// </summary>
        public bool IsAsc { get; set; }

        /// <summary>
        /// 0:索引列 1:包含列
        /// </summary>
        public int ColumnIndexType { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [JsonIgnore]
        public string Creator { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>      
        [JsonIgnore]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后修改人
        /// </summary>
        [JsonIgnore]
        public string LastModifier { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>        
        [JsonIgnore]
        public DateTime LastModifyTime { get; set; }

        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
